<?php
    $APIMaxPage = 100;
		$_developerId = "bd2c533936bfb0b87eff58841d7a77f1ef498cb8";
		$ItemUrl = "http://calamel.jp/api/2.0/json?";
		$ListUrl = $ItemUrl;
		$Category="";
		$XmlOrJson = "JSON";
		$ListModel = array(
			"Available"	=> "count",//all count
			"item"		=> array(
								"item=>{n}"	=> array(
										"site"		=> "calamel",
										"title"		=> "itemName",
										"itemid"	=> "itemCode",
										//"img"		=> "mediumImageUrl",
										"img"		=> "thumbnailImageUrl",
										"price"		=> "itemPrice",
										"bidorbuy"	=> "",
										"store"		=> "shopName",
										"NewItem"	=> "",
										"bids"		=> "",//auction
										"starttime"	=> "startTime",
										"endtime"	=> "",
										"timeleft"	=> "",
										"shopid"	=> "shopCode",//店铺ID
										"shopUrl"	=> "shopUrl",//店铺URL
										//"itemCaption"=>"itemCaption",
									)
							)
		);
		$ItemModel = array(
			"title"		=> "itemName",
			"itemid"	=> "itemCode",
			//"img"		=> "mediumImageUrl",
			"img"		=> "imageUrl",
			"url"		=> "itemUrl",
			"price"		=> "itemPrice",//現在価格です
			"quantity"	=> "",//商品の数量です。
			"bidorbuy"	=> "",//即決価格です
			"bids"		=> "",//現在の入札数です
			"condition"	=> "",//商品の状態です。
			"endtime"	=> "endTime",
			"remaintime"=> "",//残り時間
			"store"		=> "shopName",//有 StoreIcon :オークションストアの出品   无:一般の出品者の出品
			//"postageFlag"		=> "postageFlag||catchcopy",//未使用
			"taxFlag"		=> "taxFlag",//0：税込1：税別
			"itemCaption"		=> "itemCaption",//商品説明文
			"shopid"		=> "shopCode",//店铺ID
			"shopUrl"		=> "shopUrl",//店铺URL
		);
		$SortOrder = array(
			"end,A"		=>	"-updateTimestamp",//high to low
			"end,D"		=>	"+updateTimestamp",
			"price,A"	=>	"-itemPrice",//high to low
			"price,D"	=>	"+itemPrice",
		);

		//http://webservice.rakuten.co.jp/api/itemcodesearch/
		$ItemParam = array(
			//"developerId"	=> $Appid,
			"developerId"	=> $_developerId,
			"operation"	 	=> "ItemCodeSearch",
			"itemCode"		=> _GET("itemid"),
		);
		
		$oldsearchcate = checknull("id", checknull(_GET("c"), $SiteCate["shopping"]["calamel"]));
		$allsearchcate = checknull("calamel", checknull(_GET("c"), $SiteCate["shopping"]["all"]));
		//http://webservice.rakuten.co.jp/api/itemsearch/
		$ListParam = array(
			"developerId"	=> $_developerId,
			"operation"	 	=> "ItemSearch",
			"keyword"		=> $keyword,
			"shopCode"		=> "",
			"genreId"	=> empty($oldsearchcate )?"0":$oldsearchcate ,
			"genreId_all"    => empty($allsearchcate )?"0":$allsearchcate ,
			"hits"			=> "48",
			"page"			=> $pagenum,
			"sort"			=> checknull(_GET("s"), $SortOrder),
			"minPrice"		=> _GET("Minprice"),
			"maxPrice"		=> _GET("Maxprice"),
		);